'use strict'

class Route {
  constructor() {
    this.notLogin = {} //用户不需要登录的请求路由
    this.login = {} //用户登录后的请求路由
    this.nodeMap = {} //子节点请求路由
  }

  setNotLogin(routename, func) {
    this.notLogin[routename] = func
  }

  getNotLogin(routename) {
    return this.notLogin[routename]
  }

  set(routename, func) {
    this.login[routename] = func
  }

  getLogin(routename) {
    return this.login[routename]
  }

  setNode(routename, nodeName) {
    this.nodeMap[routename] = nodeName
  }

  getNodeName(routename) {
    return this.nodeMap[routename]
  }
}
let route = new Route()
module.exports = route
